package com.lam.mall.service;

import java.util.List;

import com.lam.mall.app.vo.MyOrderVo;
import com.lam.mall.app.vo.OrderCountDataVo;
import com.lam.mall.app.vo.ShopCartOrderMergerVo;
import com.lam.mall.entity.Order;
import com.lam.mall.entity.OrderLog;
import com.lam.mall.param.DeliveryOrderParam;
import com.lam.mall.param.OrderParam;

/**
 * 订单管理Service接口
 * 
 * @author admin
 * @date 2023-04-25
 */
public interface OrderService {

    /**
     * 查询订单管理
     * 
     * @param id 订单管理ID
     * @return 单个对象
     */
    public Order selectById(String id);

    /**
     * 查询订单管理列表
     * 
     * @param param 
     * @return 列表集合
     */
    public List<Order> selectList(OrderParam param);

    /**
     * 新增订单管理
     * 
     * @param order 
     * @return 
     */
    public int insert(Order order);

    /**
     * 修改订单管理
     * 
     * @param order 
     * @return 
     */
    public int update(Order order);

	/**
	 * 查询订单
	 * @param orderNo 订单号
	 * @return 单个对象
	 */
	Order selectByOrderNo(String orderNo);

	public void delivery(DeliveryOrderParam deliveryOrderParam);

	/**
	 * 查询订单
	 * @param orderNo 订单号
	 * @return 单个对象
	 */
	Order selectSimpleByOrderNo(String orderNo);

	public List<MyOrderVo> listPageByUserId(String userId, Integer status);

	void cancelOrder(Order order, Integer operType);

	void confirmOrder(Order order, Integer operType);

	void deleteOrders(List<Order> orders);

	OrderCountDataVo getOrderCount(String userId);

	ShopCartOrderMergerVo putConfirmOrderCache(String userId, ShopCartOrderMergerVo shopCartOrderMergerVo);

	ShopCartOrderMergerVo getConfirmOrderCache(String userId);

	void removeConfirmOrderCache(String userId);

	List<Order> submit(String userId, ShopCartOrderMergerVo mergerOrder);

	public void addLog(OrderLog orderLog);

	List<Order> listTimeoutOrder();

	List<Order> listWaitConfirmOrder(int preDayCount);

	List<Order> listUnConfirmPayOrder();

}
